import React, {Component} from 'react'
import {StyleSheet, View, Text, Image} from 'react-native'
import NavigationUtil from '../../../navigator/NavigationUtil.js'

export default class MyInfoComponent extends Component {
  render() {
    return (
      <View style={styles.mySelfInfo}>
        <View style={styles.infoLeft}>
          <Image
            style={styles.mySelfImg}
            source={require('../../../assets/imgs/my.jpg')}
          />
        </View>
        <View style={styles.infoRight}>
          <Text 
            style={styles.mySelfName}
            onPress = {() => {
              NavigationUtil.goPage({
                navigation: this.props.navigation
              },'MyInfo')
            }}
          >薛英儿</Text>
          <Text style={styles.signIn}>每天签到</Text>
        </View>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  mySelfInfo: {
    flexDirection: 'row',
    paddingTop: 24,
    paddingBottom: 24,
    paddingLeft: 16,
    marginBottom: 20,
    backgroundColor: '#fff',
  },
  infoRight: {
    marginLeft: 12,
  },
  mySelfImg: {
    width: 60,
    height: 60,
    borderRadius: 30,
  },
  mySelfName: {
    color: '#282828',
    fontSize: 22,
    fontFamily: 'PingFangSC-Medium',
  },
  signIn: {
    color: '#3E73FF',
    fontSize: 12,
    textAlign: 'center',
    borderRadius: 9,
    borderColor: '#3E73FF',
    borderWidth: 0.5,
    marginTop: 12,
    paddingLeft: 5,
    paddingRight: 5,
  },
})